package com.dwxt.cdms.controller;

import com.dwxt.cdms.base.Page;
import com.dwxt.cdms.entity.MedicationRemind;
import com.dwxt.cdms.service.MedicationRemindService;
import com.dwxt.common.base.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:用药提醒
 * @author chendq
 * @date 2021/10/28
 */
@RequestMapping("/cdms/medicationRemind")
@RestController
public class MedicationRemindController {

    @Autowired
    private MedicationRemindService medicationRemindService;

    /**
     * 分页查询
     */
    @RequestMapping("/page")
    public BaseResult page(Page page,MedicationRemind medicationRemind) {
        return medicationRemindService.page(page,medicationRemind);
    }

    /**
     * 新增或修改
     */
    @RequestMapping("/add")
    public BaseResult add(MedicationRemind medicationRemind) {
        return medicationRemindService.add(medicationRemind);
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public BaseResult delete(String id){
        return medicationRemindService.delete(id);
    }

}

